package com.albaba.nacosconfig.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zx
 * @version 1.0
 * @description TODO
 * @date 2024/11/6 19:36
 */
@RestController
@RefreshScope // 动态刷新配置
public class NacosConfigController {

    @Value("${config.info}")
    private String configInfo;



    @GetMapping(value = "/config/info")
    public String getConfigInfo() {
        return configInfo;
    }

}
